package cn.lanca.gof0_5._04abstract_factory.service.impl;

import com.example.demo.gof0_5._04abstract_factory.service.Animal;
import com.example.demo.gof0_5._04abstract_factory.service.Farm;
import com.example.demo.gof0_5._04abstract_factory.service.Plant;

/**
 * 具体工厂：上饶农场类
 *
 * @author meihongliang
 * @since 2020/8/7 16:30
 */
public class SRfarm implements Farm {
    /**
     * @return Animal
     */
    @Override
    public Animal newAnimal() {
        System.out.println("新马出生！");
        return new Horse();
    }

    /**
     * @return Plant
     */
    @Override
    public Plant newPlant() {
        System.out.println("水果长成！");
        return new Fruitage();
    }
}
